package com.dream.keigezhushou.Activity.acty.personal;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.dream.keigezhushou.Activity.activity.BaseActivity;
import com.dream.keigezhushou.Activity.view.MyRatingBar;
import com.dream.keigezhushou.R;

import butterknife.BindView;
import butterknife.ButterKnife;

public class CommitEvaluateActivity extends BaseActivity implements View.OnClickListener{

    @BindView(R.id.iv_return)
    ImageView ivReturn;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.tv_release)
    TextView tvRelease;
    @BindView(R.id.my_rating_bar)
    MyRatingBar myRatingBar;

    private Intent intent;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_commit_evaluate);
        ButterKnife.bind(this);

        initView();
        initData();
    }

    //初始化界面
    protected void initView(){

        myRatingBar.setClickable(true);  //设置可点击
        myRatingBar.setStar(3);
        myRatingBar.setOnRatingBarChangeListener(new MyRatingBar.OnRatingChangeListener() {
            @Override
            public void onRatingChange(int ratingCount) {

            }
        });
    }

    //初始化数据
    protected void initData(){

        ivReturn.setOnClickListener(this);
        tvRelease.setOnClickListener(this);
    }


    //点击事假的实现

    @Override
    public void onClick(View view) {

        switch (view.getId()){

            case R.id.iv_return:
                finish();
                break;

            case R.id.tv_release:
                intent = new Intent(this,EvaluateSuccessActivity.class);
                startActivity(intent);
                break;
        }
    }
}
